Method for controlling number of addresses in address table of switch

ABSTRACT

A method for controlling number of addresses in an address table of a switch in a network system, the method comprising the steps of adding a control mechanism in a learning mode of the switch; enabling one of a plurality of ports of the switch to detect a number of learned addresses in the address table; and locking the address table to stop learning and discard subsequently received packets having unmatched addresses if the number of learned addresses being detected has exceeded a predetermined maximum number of learnable addresses of the address table, thereby preventing the address table being completely occupied by a number of abnormal packets.

FIELD OF THE INVENTION

[0001] The present invention relates to network and more particularly toa method for controlling number of addresses in address table of switch.

BACKGROUND OF THE INVENTION

[0002] A conventional Ethernet system is shown in FIG. 1 whereindifferent Ethernets 1 and 2 (i.e., in different regions) areinterconnected by at least one switch 3. Switch 3 is implemented as anetwork device comprising a plurality of ports. Whether switch iscomprised of a plurality of network devices or a single one such switchis still called switch throughout the specification as long as thecommunication means between switches is implemented as common BridgeProtocol Data Units (BPDUs).

[0003] Switch 3 acts to monitor data packets communicated betweendifferent network regions. When switch has received a packet from acertain network, controller of switch may compare destination addressand source address of packet with address recorded in address table 31of database. If destination address of the packet is the same as that ofterminal 4 in the same network, the packet is discarded (i.e., notransmission) for filtering the packet transmission. Otherwise add thepacket in address table 31 of database for dynamically recording sourceaddress of the packet if source address of the packet is not found inthe address table 31. In other words, address table of switch isemployed to determine path of packet switching. Currently, a settingprocedure of address table is implemented by adding a plurality ofmessages in a long MAC address. Typically, user first enters suchmessages into terminals prior to downloading to switch. Alternatively,user may sequentially set physical address and message thereof throughnetwork management protocol. It is disadvantageous for time consumingand being prone to error.

[0004] Moreover, a typical switch has a learning capability. Hence, aswitch administrator may not perform a locking on address table. As aresult, source address of an unauthorized terminal may occupy space ofthat address table without permission. Further, when destination addressof packet received by switch is not recorded in address table (i.e., notlearned by switch), the packet may be sent to any of other remainingports. As a result, available bandwidth of switch is reduced.

[0005] Recently, applications of network have extended to communitiesand families. In a typical example, each family having address tableaccess capability is coupled to a port of switch provided by networksystem provider. Hence, a plurality of computers installed in eachfamily may access Ethernet through the port. In a disadvantageouscondition that a significant number of packets are sent to network forprocessing when there is no limitation (or no suitable limiting) by thenetwork system provider on the number of online computers from one userend. As a result, address table of switch may be completely occupiedsimultaneously which in turn reduces available bandwidth. In an extremecondition that a large number of packets having different address tablescreated by a user may occupy all available space of address table ofswitch connected to the user. To the worse, an undesired propagation ofthe packets is performed, resulting in a reduction of availablebandwidth. This means that bandwidth available to other users is reducedor even services therefor are interrupted in a worst condition.

[0006] Address learning techniques of current switch are comprised ofthe following:

[0007] 1. A self learning capability of address provided by networkadministration software. It is advantageous for limiting a size ofaddress table of switch. While it is disadvantageous for being unable tolimit or adjust a size of address table of respective port.

[0008] 2. An address learning capability provided by hardware of switchwherein each port only learns a received first source address. It isdisadvantageous because it is impossible of adjusting and controllinghardware of switch when the switch is learning the number of addressesof each port. Further, an auto aging out timer is provided. In anexample of ten computers owned by a family, there is only one computeris allowed to access network. Hence, switch can only learn one sourceaddress. As a result, there is only one computer accessing Ethernetduring online service.

[0009] Thus, it is desirable to provide a novel method for controllingnumber of address in address table of switch in order to overcome theabove drawbacks of prior art.

SUMMARY OF THE INVENTION

[0010] It is therefore an object of the present invention to provide amethod for controlling number of addresses in an address table of aswitch in a network system. The method comprises the steps of a) addinga control mechanism in a learning mode of the switch; b) enabling one ofa plurality of ports of the switch to detect a number of learnedaddresses in the address table; c) determining whether the number oflearned addresses has exceeded a predetermined maximum number oflearnable addresses of the address table; and d) locking the addresstable to stop learning and discard subsequently received packets havingunmatched addresses if a result in the step c) is positive, therebypreventing a number of the packets from completely occupying the addresstable of the switch in addition to an increase of available bandwidthfor switch and efficiency and safety of network administration.

[0011] In one aspect of the present invention, in response to thereceived packet one of the ports of the switch performs the steps forprocessing the received packet: e) comparing an address of the receivedpacket and an address recorded in the address table; f) determiningwhether the address of the received packet is matched with one ofpreviously learned and recorded addresses in the address table; g)performing an exchange of the packet if a result in the step f) ispositive; h) if the result in the step f) is negative and the number oflearned addresses in the address table has not exceeded thepredetermined maximum number of learnable addresses of the port,recording a source address and associated information in the addresstable and increasing the number of learned addresses in the addresstable by one until the number of learned addresses in the address tablehas exceeded the predetermined maximum number of learnable addresses ofthe port; and i) discarding subsequently received packets havingunmatched addresses by performing no exchange of the packet. Therefore,the invention may set the number of learnable addresses of each port foreffectively controlling the number of user accessing various portsthrough network administration software.

[0012] In another aspect of the present invention, an auto aging outtimer mechanism is added in the switch wherein information about one ofa plurality of addresses of the address table is removed therefrom whenthe information has not been used during a predetermined period of timefor reserving space for one of the ports to learn a new address, add thesame, and regularly automatically update the network system.

[0013] The above and other objects, features and advantages of thepresent invention will become apparent from the following detaileddescription taken with the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

[0014]FIG. 1 presents schematically the interconnection between twodifferent Ethernets through a switch according to prior art;

[0015]FIG. 2 is a flow chart illustrating a control mechanism in alearning mode of switch according to the invention; and

[0016]FIG. 3 is a flow chart illustrating an auto aging out timermechanism in the learning mode of switch according to the invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0017] As stated above, when a packet from a certain network is receivedby a typical switch, controller of switch may compare destinationaddress and source address of packet with address recorded in addresstable of database as well as send the packet to terminal having thedestination address. Otherwise if no matched destination address isfound switch may flood the destination address to each online port. Ifthere is a reply from terminal having the destination address withrespect to the packet, switch may record the destination address inaddress table of database. If source address of the packet is not foundin address table, switch may also record the source address in theaddress table. By utilizing this learning technique, switch is capableof maintaining an integrity and accuracy of the address table. Further,the invention may provide required data to terminals connected tonetwork for accessing network based on information contained in addresstable and thus, update data in other switches.

[0018] Referring to FIG. 2, there is shown a flow chart illustrating anadded control mechanism in above learning feature of switch according tothe invention. Any one of ports of switch may perform following stepsfor processing an address of received packet:

[0019] In step 10, a comparison is made with respect to address ofreceived packet and address recorded in address table in order todetermine whether address of the received packet is the same as onepreviously learned and recorded address in the address table. If yes,process goes to step 11. Otherwise, process goes to step 12.

[0020] In step 11, the packet is exchanged prior to jumping to step 15.

[0021] In step 12, it is determined whether the number of learnedaddresses (N) in address table has exceeded a predetermined maximumnumber of learnable addresses (N_(MAX)) of the port. If yes, processgoes to step 14. Otherwise, process goes to step 13.

[0022] In step 13, record source address and associated information inthe address table and increase N by one (i.e., N=N+1). Process then goesto step 15.

[0023] In step 14, lock the address table to stop learning, and thendiscard subsequently received packets having undesired addresses andperform no exchange on the packet.

[0024] In step 15, the process continues to receive packets from networkand processes the same as above.

[0025] Therefore, the invention may set number of learnable addresses ofeach port for effectively controlling the number of user accessingvarious ports through network administration software. This can preventa significant number of packets from sending to ports of switch. As aresult, address table is not occupied completely, available bandwidthfor switch is increased, and efficiency and safety of networkadministration is significantly improved.

[0026] Referring to FIG. 3, there is shown a flow chart illustrating anadded auto aging out timer mechanism in above learning feature of switchaccording to the invention. Switch may perform following steps withrespect to addresses of address table based on the timer:

[0027] In step 20, it is determined whether information about oneaddress in address table has been updated during a predetermined periodof time. If yes, it means that such information is inconsistent withcondition of the current network, thus process goes to step 21.Otherwise, process goes to step 22.

[0028] In step 21, remove the existing information of address fromaddress table directly by switch and decrease N by one (i.e., N=N−1).Hence, port may continue learning and recording processes of newaddresses.

[0029] In step 22, the process continues to process information about animmediate next address of address table until the auto aging out timerfor information about all addresses of address table has been processedduring the predetermined period of time.

[0030] In brief, switch may remove corresponding information of addressfrom address table when information about any address of address tablehas not been used during a specified period of time. This can reservespace for port to learn a new address. Further, the new address is addedin address table. This can regularly automatically update condition ofnetwork.

[0031] While the invention has been described by means of specificembodiments, numerous modifications and variations could be made theretoby those skilled in the art without departing from the scope and spiritof the invention set forth in the claims.

What is claimed is:
 1. A method for controlling number of addresses inan address table of a switch in a network system, the method comprisingthe steps of: a) adding a control mechanism in a learning mode of theswitch; b) enabling one of a plurality of ports of the switch to detecta number of learned addresses in the address table; c) determiningwhether the number of learned addresses has exceeded a predeterminedmaximum number of learnable addresses of the address table; and d)locking the address table to stop learning and discard subsequentlyreceived packets having unmatched addresses if a result in the step c)is positive, thereby preventing a number of the packets from completelyoccupying the address table of the switch.
 2. The method of claim 1wherein information about one of a plurality of addresses of the addresstable is removed therefrom when the information has not been used duringa predetermined period of time for reserving space for one of the portsto learn a new address and to regularly automatically update the networksystem.
 3. The method of claim 2, wherein in response to the receivedpacket one of the ports of the switch performs the steps for processingthe received packet: e) comparing an address of the received packet andan address recorded in the address table; f) determining whether theaddress of the received packet is matched with one of previously learnedand recorded addresses in the address table; g) determining whether thenumber of learned addresses (N) in the address table has exceeded thepredetermined maximum number of learnable addresses (N_(MAX)) of theport if a result in the step f) is negative; h) recording a sourceaddress and associated information in the address table and increasing Nby one if a result in the step g) is negative; and i) continuing toreceive packets from the network and processing the same as the steps e)to i).
 4. The method of claim 3, further comprising the step of lockingthe address table to stop learning, and discard subsequently receivedpackets having unmatched addresses and perform no exchange on thepackets if the result in the step g) is positive.
 5. The method of claim3, further comprising the step of performing an exchange on the packetsif the result in the step f) is positive.
 6. The method of claim 3,wherein the switch performs the steps with respect to information aboutthe addresses of the address table based on a timer thereof: j)determining whether the information about the address in the addresstable has been updated during a predetermined period of time, k)assuring the information is inconsistent with a condition of the currentnetwork system, removing the information from the address table by theswitch, and decreasing N by one if a result in the step j) is negative;l) enabling the port to continue learning and recording processes of thenew addresses; and m) continuing to process information about a next oneof the addresses of the address table until an auto aging out timer forinformation about all of the addresses of the address table has beenprocessed during the predetermined period of time.
 7. The method ofclaim 6, further comprising the step of continuing to processinformation about the next one of the addresses of the address table thesame as the steps k) to m) if a result in the step j) is positive.